$(function(){
    $('#title').blur(function () {
        var title=$('#title').val()
        if(title==''){
            alert("标题不能为空！")
        }else{
            $.get("/detail/title",{title:title},function (data) {
                if(data.title=="aaa"){
                    $('#msg').html("不可用").css("color","red");
                }else {
                    $('#msg').html("可用").css("color","green");
                }
            },"JSON")
        }
    })
});